HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/platform/ext-runtime/custom/test/runtime_test.py
#!/usr/bin/python

import os
import unittest

from gae_ext_runtime import testutil

RUNTIME_DEF_ROOT = os.path.dirname(os.path.dirname(__file__))

class RuntimeTest(testutil.TestBase):

  def setUp(self):
    self.runtime_def_root = RUNTIME_DEF_ROOT
    super(RuntimeTest, self).setUp()

  def test_custom_runtime(self):
    self.write_file('Dockerfile', 'boring contents')
    self.generate_configs()
    self.assert_file_exists_with_contents('app.yaml',
                                          'env: flex\nruntime: custom\n')

  def test_custom_runtime_no_write(self):
    """Ensure custom runtime writes app.yaml to disk with GenerateConfigData."""
    self.write_file('Dockerfile', 'boring contents')
    self.generate_config_data()
    self.assert_file_exists_with_contents(
        'app.yaml',
        'env: flex\nruntime: custom\n')

if __name__ == '__main__':
  unittest.main()